#!/usr/bin/env bash

ip_addr=`netstat -antpl |  grep -i listen | grep 5813 | awk '{print $4}'`

curl -v -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:49" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
--data-ascii "{\"wifiId\":\"$wifiidList\"}" \
"http://$ip_addr/zc-julink_v1/v1/getCachedValueByKey"

curl -v -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:9" -H "x-zc-sub-domain-id:21" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
--data-ascii "{\"wifiIdList\":\"$wifiidList\"}" \
"http://$ip_addr/zc-julink_v1/v1/cleanCaches"

curl -v -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:49" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
"http://10.220.117.22:5813/zc-julink_v1/v1/fetchAllCachedKeys" | wc



curl -v -X POST -H "Content-Type:application/x-zc-object" "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
--data-ascii "{\"wifiId\":\"$wifiidList\"}" \
"http://$ip_addr/zc-product_v1/v1/getDomainWithWifiId"




curl -v -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:49" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
--data-ascii "{\"wifiId\":\"86500710006000400550000014d564b84fa3\"}" \
"http://10.220.117.22:5813/zc-julink_v1/v1/getCachedValueByKey" | wc



ip_addr=`echo $ip_addr | cut -d ':' -f1`
curl -v -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:49" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" "http://$ip_addr:6060/zc-julink_v1/v1/x-debug"

